package com.md.common.utils.validate;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 功能描述：数数据校验结果类
 *
 * @author lujianping@oak168.com
 * @version 1.0
 * @date 2017/9/12 10:30
 * @since JDK 1.8
 */
public class ValidateResult {
    private boolean hasErrors;// 是否有错误
    private int errorCode;// 错误码
    private String errorMsg;// 错误信息

    public boolean isHasErrors() {
        return hasErrors;
    }

    public void setHasErrors(boolean hasErrors) {
        this.hasErrors = hasErrors;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

}
